package com.ruoyi.repurchase.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.repurchase.mapper.RePurchaseMapper;
import com.ruoyi.repurchase.domain.RePurchase;
import com.ruoyi.repurchase.service.IRePurchaseService;

/**
 * 商品退货Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-09-26
 */
@Service
public class RePurchaseServiceImpl implements IRePurchaseService 
{
    @Autowired
    private RePurchaseMapper rePurchaseMapper;

    /**
     * 查询商品退货
     * 
     * @param id 商品退货主键
     * @return 商品退货
     */
    @Override
    public RePurchase selectRePurchaseById(Integer id)
    {
        return rePurchaseMapper.selectRePurchaseById(id);
    }

    /**
     * 查询商品退货列表
     * 
     * @param rePurchase 商品退货
     * @return 商品退货
     */
    @Override
    public List<RePurchase> selectRePurchaseList(RePurchase rePurchase)
    {
        return rePurchaseMapper.selectRePurchaseList(rePurchase);
    }

    /**
     * 新增商品退货
     * 
     * @param rePurchase 商品退货
     * @return 结果
     */
    @Override
    public int insertRePurchase(RePurchase rePurchase)
    {
        return rePurchaseMapper.insertRePurchase(rePurchase);
    }

    /**
     * 修改商品退货
     * 
     * @param rePurchase 商品退货
     * @return 结果
     */
    @Override
    public int updateRePurchase(RePurchase rePurchase)
    {
        return rePurchaseMapper.updateRePurchase(rePurchase);
    }

    /**
     * 批量删除商品退货
     * 
     * @param ids 需要删除的商品退货主键
     * @return 结果
     */
    @Override
    public int deleteRePurchaseByIds(Integer[] ids)
    {
        return rePurchaseMapper.deleteRePurchaseByIds(ids);
    }

    /**
     * 删除商品退货信息
     * 
     * @param id 商品退货主键
     * @return 结果
     */
    @Override
    public int deleteRePurchaseById(Integer id)
    {
        return rePurchaseMapper.deleteRePurchaseById(id);
    }
}
